package com.example.nbb.Controller;

import com.example.nbb.Service.NewService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin//跨域
@RestController//遵循RestFul
@RequestMapping("/nbb/New/")
public class NewController {

    @Resource
    NewService newService;

    @GetMapping("getAll")
    public String getAll() {
        return newService.getAllNew();
    }


}
